<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let str = prompt('请输入数字')

      const isPalindrome = function (str) {
        let str1 = str.split('').reverse().join('')
        if (str === str1) {
         console.log('这个数是回文数')
          return "true"
        } else {
          console.log('这个数不是回文数')
          return "false"
        }
      }
     console.log( isPalindrome(str))
    </script>
  </body>
</html>
